The dataset was generated with the Visium technology of 10x Genomics(https://www.10xgenomics.com/)
Code was updated from seurat package: https://satijalab.org/seurat/
The data used here is recently released “stxBrain” dataset of sagital mouse brain slices generated using the Visium v1 chemistry including two serial anterior sections, and two (matched) serial posterior sections.
The variance in molecular counts across spots is not only technical in nature, but also is dependent on the tissue anatomy.
First normalize the data to account for variance in sequencing depth across data points.
Place genes into groups based on mean. By boxplo, log-normalization fails to adequately normalize genes in the first three groups, sctransform normalization mitigates this effect.
Run dimensionality reduction and clustering on the RNA expression data
Use the cells.highlight parameter to demarcate particular cells of interest on a SpatialDimPlot.
Perform differential expression based on pre-annotated anatomical regions within the tissue, which may be determined either from unsupervised clustering or prior knowledge.
Implemented in FindSpatiallyVariables, is to search for features exhibiting spatial patterning in the absence of pre-annotation.
Subset the object, visualize the cortical cells either on the full image, or a cropped image.